plain: regenerate all twins, add content-drift guard, close detail gaps#51
Open
Alexgodoroja wants to merge 4 commits into
Open
plain: regenerate all twins, add content-drift guard, close detail gaps#51Alexgodoroja wants to merge 4 commits into
Alexgodoroja wants to merge 4 commits into
Conversation
added 3 commits
June 24, 2026 15:06
The plain (machine-UI) mirrors had drifted badly: the only CI guard (check:plain) verifies 1:1 file existence but never content, and the content generator (regen-plain.mjs) was manual-only and never wired into CI — so twins silently rotted whenever a marketing page was edited. Changes: - Regenerate all 37 manifest twins from current sources via regen-plain.mjs. - Add app-store and publish to the regen manifest (were required by the coverage guard but had no generator entry) and generate their twins. - Content-drift guard: regen-plain now stamps each twin with its source path + SHA-256; check-plain-coverage now fails when a source changed without regeneration. Turns silent drift into a red CI check. - Hand-patch ~12 twins where the summarizer dropped material facts (commands, CLI flags, config keys, numeric specs, per-app metadata). Verified: check:plain green (39 stamped twins in sync), astro build green (190 pages). skills/index.astro stays unstamped — it renders live from upstream JSON at build time.
main merged #50 (add Miren app + app-card fixes), which changed src/pages/app-store.astro. The drift guard correctly flagged the twin as stale. Regenerate it against the updated source and restore the per-app spec lines (methods, download size, category, version, license) that the summarizer drops — now including the Miren entry. Verified: check:plain green, astro build green (190 pages).
|
🚀 Preview deployed to Cloudflare Pages
|
Wire the GEMINI_API_KEY secret into CI so drift self-heals instead of only failing the guard. - regen-plain.mjs: add --stale-only mode (regenerate only twins whose stamped source hash no longer matches the source); require the API key only when there is actually a page to regenerate, so it exits 0 with no key when nothing has drifted (incl. fork PRs without the secret). - plain-sync.yml: on same-repo PRs, run regen --stale-only and push the refreshed twins back to the PR branch with a review comment. ci.yml's check:plain stays the source-of-truth gate (and the backstop on main); fork PRs fall back to it. Optional PLAIN_SYNC_TOKEN re-triggers CI on the auto-commit; otherwise falls back to GITHUB_TOKEN.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The plain (machine-UI) mirrors under
src/pages/plain/had drifted badly out of sync with their marketing/docs sources. Root cause:check:plainenforced only 1:1 file existence (every human page has a twin, no orphans) — it explicitly did not compare content. So CI stayed green while every twin went stale.regen-plain.mjswas manual-only (needs an API key, not referenced in any workflow), so nobody re-ran it after editing a marketing page. Its manifest didn't even coverapp-store/publish, which the guard still required.Worst offenders before this change:
app-store(9 source edits, twin never updated),index(6),publish(6), plus many docs pages 1–2 edits behind.What changed
app-store/publish, now added to the manifest).regen-plain.mjsstamps each twin with its source path + SHA-256;check-plain-coverage.mjs(in CI) now fails when a source changes without regeneration — turning silent staleness into a red check, and acting as the backstop onmain.plain-sync.yml). On same-repo PRs, CI runsregen-plain.mjs --stale-onlyand pushes the refreshed twins back to the PR branch with a review comment, so drift self-heals with a human still reviewing the bot commit. Fork PRs (no secret / no push) fall back to thecheck:plainguard.Verification
npm run check:plain→ green (39 stamped twins in sync, no orphans)npm run build→ green (190 pages), no escaping errorsregen-plain.mjs --stale-only→ exits 0 with no work when twins are in sync (no API key required in that case)skills/index.astrointentionally left unstamped — it renders live from upstream JSON at build time.Ops notes
GEMINI_API_KEYActions secret (added).PLAIN_SYNC_TOKENPAT so the auto-regen commit re-triggers the build check automatically; without it the fix still lands on the branch but the check must be re-run.